<template>
  <view class="">
    <u-tabs
      :list="list"
      :is-scroll="false"
      :current="current"
      @change="change"
    ></u-tabs>
    <view class="" v-if="current == 0">
      <tradeComponent :agentNo="agentNo"></tradeComponent>
    </view>
    <view class="" v-else>
      <infoComponent :agentNo="agentNo"></infoComponent>
    </view>
  </view>
</template>

<script>
import tradeComponent from './component/tradeComponent.vue';
import infoComponent from './component/infoComponent.vue';
export default {
  components: {
    infoComponent,
    tradeComponent,
  },
  data() {
    return {
      agentNo: '',
      list: [
        {
          name: '业绩详情',
        },
        {
          name: '信息详情',
        },
      ],
      current: 0,
    };
  },
  onLoad(options) {
    // this.agentNo = this.$route.query.agentNo;
    this.agentNo = options.agentNo;
    console.log('this.agentNo----->43', this.agentNo);
  },
  methods: {
    change(index) {
      this.current = index;
    },
  },
};
</script>

<style></style>
